

package com.zx.config.conversion;

import org.apache.commons.lang.StringUtils;
import org.springframework.core.convert.converter.Converter;

/**
 * @Description: StringToDoubleConversion
 * @Author: zhou hang
 * @CreateTime: 2015-07-17 11:15
 */
public class StringToDoubleConversion implements Converter<String, Double> {

    @Override
    public Double convert(String source) {
        if (StringUtils.isBlank(source)) {
            return null;
        }
        return Double.parseDouble(source);
    }
}